﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="../static/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="../static/js/jquery.js"></script>
    <script src="../static/js/vue.js" type="text/javascript"></script>
    <script src="../static/js/axios.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){	
	//顶部导航切换
	$(".nav li a").click(function(){
		$(".nav li a.selected").removeClass("selected")
		$(this).addClass("selected");
	})	
})	
</script>


</head>

<body style="background:url(../static/images/topbg.gif) repeat-x;">

    <div class="topleft">
    <a href="main.html" target="_parent"><img src="../static/images/loginlogo2.png" title="系统首页" /></a>
    </div>

            
    <div class="topright">    
    <ul>
    <li><span><img src="../static/images/help.png" title="帮助"  class="helpimg"/></span><a href="tech.html" target="rightFrame">帮助</a></li>
    <li><a href="/logout1" target="_parent">退出</a></li>
    </ul>
     
    <div class="user" id="app">
    	<span><a href="myInfo.html" target="rightFrame" id="loginUser">{{loginUser.name}}</a></span>
    </div>    
    
    </div>

</body>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data:
            {
                loginUser: '',
            },
        // 方法存放区
        methods: {
            getUser() {
                axios({
                    method: 'POST',
                    url: '/getUser',
                }).then(function (res) {
                    vm.loginUser = res.data;
                    sessionStorage.removeItem("customer");
                    sessionStorage.setItem("customer", JSON.stringify(vm.loginUser));
                }).catch(function (reason) {
                    console.log(reason);
                })
            }
        },//页面加载完自动执行
        mounted() {
            this.getUser();
        }
    })
</script>
</html>
